import { ApiProperty, PickType } from '@nestjs/swagger'
import { IsNotEmpty } from 'class-validator'

// 定义数据传输对象
export class RoleDto {
  @ApiProperty({ description: '角色Id' })
  fId: string

  @ApiProperty({ description: '角色名' })
  @IsNotEmpty({ message: '角色名不能为空' })
  fName: string;

  @ApiProperty({ description: '排序值' })
  @IsNotEmpty({ message: '排序值不能为空' })
  fSort: string;

  @ApiProperty({ description: '角色创建时间' })
  f_create_time: string

  @ApiProperty({ description: '角色状态' })
  f_state: string
}

export class addRoleDto extends PickType(RoleDto, ['fName', 'fSort']) { }

export class delRoleDto extends PickType(RoleDto, ['fId']) { }